//
//  DBEngine.h
//  TravelGuideMdd
//
//  Created by Song Xiaofeng on 13-9-5.
//  Copyright (c) 2013年 mafengwo.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DBConst.h"
#import "FMDatabaseQueue.h" // add by liuche at 2014-06-30

@interface DBEngine : NSObject
{
    NSString *_mainDBPath;
}
@property(nonatomic, readonly)NSString *mainDBPath;

+ (DBEngine*)sharedInstance;
@property (nonatomic, readonly) FMDatabaseQueue *databaseQueue;


-(void)dbInsertOrUpdateTable:(NSString*)tableName
                   arrayDict:(NSArray*)arrayDict
                       idKey:(NSString*)idKey
                   keyOthers:(NSArray*)otherKeys;

-(void)dbDeleteTable:(NSString*)tableName
            arrayIds:(NSArray*)arrayIds;

/** 清除表中所有数据 */
-(void)dbDeleteTable:(NSString*)tableName;



-(void)dbInsertOrUpdateTable:(NSString*)tableName
                   jsonArray:(MFWJson*)jsonArray
                       idKey:(NSString*)idKey
                   keyOthers:(NSArray*)otherKeys;






@end
